﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XingFuStudio.Pioneer.Applications.City.Shop {
    /// <summary>
    /// 商品项
    /// </summary>
    public class ShopItem {
        /// <summary>
        /// ID
        /// </summary>
        public int ID {
            get;
            set;
        }

        /// <summary>
        /// 关键字
        /// </summary>
        public string Key {
            get;
            set;
        }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name {
            get;
            set;
        }

        /// <summary>
        /// 售价
        /// </summary>
        public int Price {
            get;
            set;
        }

        /// <summary>
        /// 初始化商品自身数据
        /// </summary>
        /// <param name="shopItems"></param>
        public virtual void InitShop(Dictionary<string, object> shopItems) {
            this.ID = Convert.ToInt32((string)shopItems["eid"]);
            this.Key = (string)shopItems["ekey"];
            this.Name = (string)shopItems["ename"];
        }
    }
}
